package org.edu.modules.terminal.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.edu.common.aspect.annotation.AutoLog;
import org.edu.common.system.base.controller.BaseController;
import org.edu.modules.terminal.entity.VeCuzTerminal;
import org.edu.modules.terminal.service.IVeCuzTerminalService;
import org.edu.page.PageCondition;
import org.edu.page.PageResult;
import org.edu.page.PageUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags={"测试分页"})
@RestController
@RequestMapping({"/course/testfenye"})
public class CeShiFenyeController
        extends BaseController<VeCuzTerminal, IVeCuzTerminalService>
{
    private static final Logger log = LoggerFactory.getLogger(CeShiFenyeController.class);
    @Autowired
    private IVeCuzTerminalService iVeCuzTerminalService;

    @AutoLog("课程查询框查询-课程分页")
    @ApiOperation(value="课程查询框查询", notes="课程查询框查询-课程分页")
    @PostMapping({"/courseList"})
    public PageResult userList(@RequestBody PageCondition pageCondition)
    {
        PageCondition pageInitCondition = PageUtils.initPageCondition(pageCondition);
        PageResult allPage = this.iVeCuzTerminalService.findAllPage(pageInitCondition);
        return allPage;
    }
}
